home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch6k < prev    next >
Encoding:
Internet Message Format  |  1989-11-27  |  55.7 KB

  1. Path: uunet!zephyr.ens.tek.com!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v08i064:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch6k
  5. Message-ID: <4853@tekred.CNA.TEK.COM>
  6. Date: 22 Nov 89 19:54:11 GMT
  7. Sender: nobody@tekred.CNA.TEK.COM
  8. Lines: 2059
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 8, Issue 64
  13. Archive-name: NetHack3/Patch6k
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 11 (of 15)."
  25. # Contents:  patches06k
  26. # Wrapped by billr@saab on Wed Nov 22 10:50:19 1989
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'patches06k' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'patches06k'\"
  30. else
  31. echo shar: Extracting \"'patches06k'\" \(53197 characters\)
  32. sed "s/^X//" >'patches06k' <<'END_OF_FILE'
  33. X*** src/Old/read.c    Sun Nov 19 13:09:00 1989
  34. X--- src/read.c    Fri Nov 17 19:32:14 1989
  35. X***************
  36. X*** 1,4 ****
  37. X! /*    SCCS Id: @(#)read.c    3.0    88/04/13
  38. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  39. X  /* NetHack may be freely redistributed.  See license for details. */
  40. X  
  41. X--- 1,4 ----
  42. X! /*    SCCS Id: @(#)read.c    3.0    89/11/15
  43. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  44. X  /* NetHack may be freely redistributed.  See license for details. */
  45. X  
  46. X***************
  47. X*** 12,18 ****
  48. X  #endif
  49. X      0 };
  50. X  
  51. X! static void explode P((struct obj *));
  52. X  static void do_class_genocide();
  53. X  
  54. X  int
  55. X--- 12,18 ----
  56. X  #endif
  57. X      0 };
  58. X  
  59. X! static void FDECL(explode, (struct obj *));
  60. X  static void do_class_genocide();
  61. X  
  62. X  int
  63. X***************
  64. X*** 52,58 ****
  65. X--- 52,60 ----
  66. X          pline("Being blind, you cannot read the formula on the scroll.");
  67. X          return(0);
  68. X          }
  69. X+ #ifndef NO_SIGNAL
  70. X      scroll->in_use = TRUE;        /* now being read */
  71. X+ #endif
  72. X  #ifdef SPELLS
  73. X      if(scroll->olet == SPBOOK_SYM) {
  74. X          if(confused) {
  75. X***************
  76. X*** 85,90 ****
  77. X--- 87,95 ----
  78. X          }
  79. X          if(!(scroll->otyp == SCR_BLANK_PAPER) || confused)
  80. X              useup(scroll);
  81. X+ #ifndef NO_SIGNAL
  82. X+         else scroll->in_use = FALSE;
  83. X+ #endif
  84. X      }
  85. X      return(1);
  86. X  }
  87. X***************
  88. X*** 121,126 ****
  89. X--- 126,297 ----
  90. X          Blind ? "" : Hallucination ? hcolor() : color);
  91. X  }
  92. X  
  93. X+ /*
  94. X+  * recharge an object; curse_bless is -1 if the recharging implement
  95. X+  * was cursed, +1 if blessed, 0 otherwise.
  96. X+  */
  97. X+ static
  98. X+ void
  99. X+ recharge(obj, curse_bless)
  100. X+ struct obj *obj;
  101. X+ int curse_bless;
  102. X+ {
  103. X+     register int n;
  104. X+     boolean cursed, blessed;
  105. X+ 
  106. X+     cursed = curse_bless < 0;
  107. X+     blessed = curse_bless > 0;
  108. X+ 
  109. X+     if (obj->olet != WAND_SYM) {
  110. X+         switch(obj->otyp) {
  111. X+         case MAGIC_MARKER:
  112. X+         if (cursed) stripspe(obj);
  113. X+         else if (blessed) {
  114. X+             n = obj->spe;
  115. X+             if (n < 50) obj->spe = 50;
  116. X+             if (n >= 50 && n < 75) obj->spe = 75;
  117. X+             if (n >= 75) obj->spe += 10;
  118. X+             p_glow2(obj,blue);
  119. X+         } else {
  120. X+             if (obj->spe < 50) obj->spe = 50;
  121. X+             else obj->spe++;
  122. X+             p_glow2(obj,white);
  123. X+         }
  124. X+         break;
  125. X+         case LAMP:
  126. X+         if (cursed) stripspe(obj);
  127. X+         else if (blessed) {
  128. X+             n = rn2(11);
  129. X+             if (obj->spe < n) obj->spe = n;
  130. X+             else obj->spe += rnd(3);
  131. X+             p_glow2(obj,blue);
  132. X+         } else {
  133. X+             obj->spe++;
  134. X+             p_glow1(obj);
  135. X+         }
  136. X+         break;
  137. X+         case MAGIC_LAMP:
  138. X+         if (cursed) stripspe(obj);
  139. X+         else if (blessed > 0) {
  140. X+             if (obj->spe == 1 || obj->recharged)
  141. X+             pline(nothing_happens);
  142. X+             else {
  143. X+             obj->spe = 1;
  144. X+             obj->recharged = 1;
  145. X+             p_glow1(obj);
  146. X+             }
  147. X+         } else {
  148. X+             if (obj->spe == 1 || obj->recharged)
  149. X+             pline(nothing_happens);
  150. X+             else {
  151. X+             n = rn2(2);
  152. X+             if (!n) {
  153. X+                 obj->spe = 1;
  154. X+                 obj->recharged = 1;
  155. X+                 p_glow1(obj);
  156. X+             } else pline(nothing_happens);
  157. X+             }
  158. X+         }
  159. X+         break;
  160. X+         case CRYSTAL_BALL:
  161. X+         if (cursed) stripspe(obj);
  162. X+         else if (blessed) {
  163. X+             obj->spe = 6;
  164. X+             p_glow2(obj,blue);
  165. X+         } else {
  166. X+             if (obj->spe < 5) {
  167. X+             obj->spe++;
  168. X+             p_glow1(obj);
  169. X+             } else pline(nothing_happens);
  170. X+         }
  171. X+         break;
  172. X+         case BAG_OF_TRICKS:
  173. X+         if (cursed) stripspe(obj);
  174. X+         else if (blessed) {
  175. X+             if (obj->spe <= 10)
  176. X+             obj->spe += (5 + rnd(10));
  177. X+             else obj->spe += (5 + rnd(5));
  178. X+             p_glow2(obj,blue);
  179. X+         } else {
  180. X+             obj->spe += rnd(5);
  181. X+             p_glow1(obj);
  182. X+         }
  183. X+         break;
  184. X+         default:
  185. X+         You("have a feeling of loss.");
  186. X+         return;
  187. X+         } /* switch */
  188. X+     }
  189. X+     else {
  190. X+         if (obj->otyp == WAN_WISHING) {
  191. X+         if (obj->recharged) { /* recharged once already? */
  192. X+             explode(obj);
  193. X+             return;
  194. X+         }
  195. X+         if (cursed) stripspe(obj);
  196. X+         else if (blessed) {
  197. X+             if (obj->spe != 3) {
  198. X+             obj->spe = 3;
  199. X+             p_glow2(obj,blue);
  200. X+             } else {
  201. X+             explode(obj);
  202. X+             return;
  203. X+             }
  204. X+         } else {
  205. X+             if (obj->spe < 3) {
  206. X+             obj->spe++;
  207. X+             p_glow2(obj,blue);
  208. X+             } else pline(nothing_happens);
  209. X+         }
  210. X+         obj->recharged = 1; /* another recharging disallowed */
  211. X+         }
  212. X+         else {
  213. X+         if (cursed) stripspe(obj);
  214. X+         else if (blessed) {
  215. X+             if (objects[obj->otyp].bits & NODIR) {
  216. X+             n = rn1(5,11);
  217. X+             if (obj->spe < n) obj->spe = n;
  218. X+             else obj->spe++;
  219. X+             }
  220. X+             else {
  221. X+             n = rn1(5,4);
  222. X+             if (obj->spe < n) obj->spe = n;
  223. X+             else obj->spe++;
  224. X+             }
  225. X+             p_glow2(obj,blue);
  226. X+         } else {
  227. X+             obj->spe++;
  228. X+             p_glow1(obj);
  229. X+         }
  230. X+         }
  231. X+     }
  232. X+ }
  233. X+ 
  234. X+ /*
  235. X+  * forget some things (e.g. after reading a scroll of amnesia). abs(howmuch)
  236. X+  * controls the level of forgetfulness; 0 == part of the map, 1 == all of
  237. X+  * of map,  2 == part of map + spells, 3 == all of map + spells.
  238. X+  */
  239. X+ 
  240. X+ static
  241. X+ void
  242. X+ forget(howmuch)
  243. X+ boolean howmuch;
  244. X+ {
  245. X+     register int zx, zy;
  246. X+ 
  247. X+     known = TRUE;
  248. X+     for(zx = 0; zx < COLNO; zx++) for(zy = 0; zy < ROWNO; zy++)
  249. X+         if(howmuch & 1 || rn2(7))
  250. X+         if(!cansee(zx,zy))
  251. X+             levl[zx][zy].seen = levl[zx][zy].new =
  252. X+             levl[zx][zy].scrsym = 0;
  253. X+     docrt();
  254. X+ #ifdef SPELLS
  255. X+     if(howmuch & 2) losespells();
  256. X+ #endif
  257. X+ }
  258. X+ 
  259. X  int
  260. X  seffects(sobj)
  261. X  register struct obj    *sobj;
  262. X***************
  263. X*** 127,132 ****
  264. X--- 298,304 ----
  265. X  {
  266. X      register int cval = 0;
  267. X      register boolean confused = (Confusion != 0);
  268. X+     register struct obj *otmp;
  269. X  
  270. X      switch(sobj->otyp) {
  271. X  #ifdef MAIL
  272. X***************
  273. X*** 142,149 ****
  274. X  #endif
  275. X      case SCR_ENCHANT_ARMOR:
  276. X          {
  277. X-         register struct obj *otmp = some_armor();
  278. X          register schar s = 0;
  279. X          if(!otmp) {
  280. X              strange_feeling(sobj,
  281. X                      !Blind ? "Your skin glows then fades." :
  282. X--- 314,321 ----
  283. X  #endif
  284. X      case SCR_ENCHANT_ARMOR:
  285. X          {
  286. X          register schar s = 0;
  287. X+         otmp = some_armor();
  288. X          if(!otmp) {
  289. X              strange_feeling(sobj,
  290. X                      !Blind ? "Your skin glows then fades." :
  291. X***************
  292. X*** 162,169 ****
  293. X                    sobj->cursed ? black : "gold",
  294. X                  sobj->cursed ? "glow" :
  295. X                    (is_shield(otmp) ? "layer" : "shield"));
  296. X!             if(!(otmp->rustfree))
  297. X!                 otmp->rustfree = !(sobj->cursed);
  298. X              break;
  299. X          }
  300. X  #ifdef TOLKIEN
  301. X--- 334,341 ----
  302. X                    sobj->cursed ? black : "gold",
  303. X                  sobj->cursed ? "glow" :
  304. X                    (is_shield(otmp) ? "layer" : "shield"));
  305. X!             if(!(sobj->cursed))
  306. X!                 otmp->rustfree = TRUE;
  307. X              break;
  308. X          }
  309. X  #ifdef TOLKIEN
  310. X***************
  311. X*** 200,214 ****
  312. X          break;
  313. X          }
  314. X      case SCR_DESTROY_ARMOR:
  315. X!         {   register struct obj *otmp = some_armor();
  316. X! 
  317. X          if(confused) {
  318. X              if(!otmp) {
  319. X                  strange_feeling(sobj,"Your bones itch.");
  320. X                  return(1);
  321. X              }
  322. X-             p_glow2(otmp,purple);
  323. X              otmp->rustfree = sobj->cursed;
  324. X              break;
  325. X          }
  326. X          if(!sobj->cursed || (sobj->cursed && (!otmp || !otmp->cursed))) {
  327. X--- 372,386 ----
  328. X          break;
  329. X          }
  330. X      case SCR_DESTROY_ARMOR:
  331. X!         {
  332. X!         otmp = some_armor();
  333. X          if(confused) {
  334. X              if(!otmp) {
  335. X                  strange_feeling(sobj,"Your bones itch.");
  336. X                  return(1);
  337. X              }
  338. X              otmp->rustfree = sobj->cursed;
  339. X+             p_glow2(otmp,purple);
  340. X              break;
  341. X          }
  342. X          if(!sobj->cursed || (sobj->cursed && (!otmp || !otmp->cursed))) {
  343. X***************
  344. X*** 343,348 ****
  345. X--- 515,521 ----
  346. X          if(uwep && (uwep->olet == WEAPON_SYM || uwep->otyp == PICK_AXE)
  347. X                              && confused) {
  348. X          /* olet check added 10/25/86 GAN */
  349. X+                         uwep->rustfree = !(sobj->cursed);
  350. X              if(Blind)
  351. X                  Your("weapon feels warm for a moment.");
  352. X              else
  353. X***************
  354. X*** 352,358 ****
  355. X                  Hallucination ? hcolor() :
  356. X                    sobj->cursed ? purple : "gold",
  357. X                  sobj->cursed ? "glow" : "shield");
  358. X-             uwep->rustfree = !(sobj->cursed);
  359. X          } else return !chwepon(sobj, bcsign(sobj)*2+1);
  360. X          break;
  361. X      case SCR_TAMING:
  362. X--- 525,530 ----
  363. X***************
  364. X*** 436,443 ****
  365. X              while(invent && !ggetobj("identify", identify, cval));
  366. X          return(1);
  367. X      case SCR_CHARGING:
  368. X-         {    register struct obj *obj;
  369. X-         register int n;
  370. X          if (confused) {
  371. X              You("feel charged up!");
  372. X              break;
  373. X--- 608,613 ----
  374. X***************
  375. X*** 444,578 ****
  376. X          }
  377. X          known = TRUE;
  378. X          pline("This is a charging scroll.");
  379. X!         obj = getobj("0#", "charge");
  380. X!         if (!obj) break;
  381. X!         if (obj->olet != WAND_SYM) {
  382. X!             switch(obj->otyp) {
  383. X!             case MAGIC_MARKER:
  384. X!             if (sobj->cursed) stripspe(obj);
  385. X!             else if (sobj->blessed) {
  386. X!                 n = obj->spe;
  387. X!                 if (n < 50) obj->spe = 50;
  388. X!                 if (n >= 50 && n < 75) obj->spe = 75;
  389. X!                 if (n >= 75) obj->spe += 10;
  390. X!                 p_glow2(obj,blue);
  391. X!             } else {
  392. X!                 if (obj->spe < 50) obj->spe = 50;
  393. X!                 else obj->spe++;
  394. X!                 p_glow2(obj,white);
  395. X!             }
  396. X!             break;
  397. X!             case LAMP:
  398. X!             if (sobj->cursed) stripspe(obj);
  399. X!             else if (sobj->blessed) {
  400. X!                 n = rn2(11);
  401. X!                 if (obj->spe < n) obj->spe = n;
  402. X!                 else obj->spe += rnd(3);
  403. X!                 p_glow2(obj,blue);
  404. X!             } else {
  405. X!                 obj->spe++;
  406. X!                 p_glow1(obj);
  407. X!             }
  408. X!             break;
  409. X!             case MAGIC_LAMP:
  410. X!             if (sobj->cursed) stripspe(obj);
  411. X!             else if (sobj->blessed) {
  412. X!                 if (obj->spe == 1 || obj->recharged)
  413. X!                 pline(nothing_happens);
  414. X!                 else {
  415. X!                 obj->spe = 1;
  416. X!                 obj->recharged = 1;
  417. X!                 p_glow1(obj);
  418. X!                 }
  419. X!             } else {
  420. X!                 if (obj->spe == 1 || obj->recharged)
  421. X!                 pline(nothing_happens);
  422. X!                 else {
  423. X!                 n = rn2(2);
  424. X!                 if (!n) {
  425. X!                     obj->spe = 1;
  426. X!                     obj->recharged = 1;
  427. X!                     p_glow1(obj);
  428. X!                 } else pline(nothing_happens);
  429. X!                 }
  430. X!             }
  431. X!             break;
  432. X!             case CRYSTAL_BALL:
  433. X!             if (sobj->cursed) stripspe(obj);
  434. X!             else if (sobj->blessed) {
  435. X!                 obj->spe = 6;
  436. X!                 p_glow2(obj,blue);
  437. X!             } else {
  438. X!                 if (obj->spe < 5) {
  439. X!                 obj->spe++;
  440. X!                 p_glow1(obj);
  441. X!                 } else pline(nothing_happens);
  442. X!             }
  443. X!             break;
  444. X!             case BAG_OF_TRICKS:
  445. X!             if (sobj->cursed) stripspe(obj);
  446. X!             else if (sobj->blessed) {
  447. X!                 if (obj->spe <= 10)
  448. X!                 obj->spe += (5 + rnd(10));
  449. X!                 else obj->spe += (5 + rnd(5));
  450. X!                 p_glow2(obj,blue);
  451. X!             } else {
  452. X!                 obj->spe += rnd(5);
  453. X!                 p_glow1(obj);
  454. X!             }
  455. X!             break;
  456. X!             default:
  457. X!             pline("The scroll %s%s, and disintegrates.",
  458. X!                 Blind ? "vibrates violently" : "glows ",
  459. X!                 Blind ? "" : Hallucination ? hcolor() : "dark red");
  460. X!             } /* switch */
  461. X!             break;
  462. X!         }
  463. X!         else {
  464. X!             if (obj->otyp == WAN_WISHING) {
  465. X!             if (obj->recharged) { /* recharged once already? */
  466. X!                 explode(obj);
  467. X!                 break;
  468. X!             }
  469. X!             if (sobj->cursed) stripspe(obj);
  470. X!             else if (sobj->blessed) {
  471. X!                 if (obj->spe != 3) {
  472. X!                 obj->spe = 3;
  473. X!                 p_glow2(obj,blue);
  474. X!                 } else {
  475. X!                 explode(obj);
  476. X!                 break;
  477. X!                 }
  478. X!             } else {
  479. X!                 if (obj->spe < 3) {
  480. X!                 obj->spe++;
  481. X!                 p_glow2(obj,blue);
  482. X!                 } else pline(nothing_happens);
  483. X!             }
  484. X!             obj->recharged = 1; /* another recharging disallowed */
  485. X!             }
  486. X!             else {
  487. X!             if (sobj->cursed) stripspe(obj);
  488. X!             else if (sobj->blessed) {
  489. X!                 if (objects[obj->otyp].bits & NODIR) {
  490. X!                 n = rn1(5,11);
  491. X!                 if (obj->spe < n) obj->spe = n;
  492. X!                 else obj->spe++;
  493. X!                 }
  494. X!                 else {
  495. X!                 n = rn1(5,4);
  496. X!                 if (obj->spe < n) obj->spe = n;
  497. X!                 else obj->spe++;
  498. X!                 }
  499. X!                 p_glow2(obj,blue);
  500. X!             } else {
  501. X!                 obj->spe++;
  502. X!                 p_glow1(obj);
  503. X!             }
  504. X!             break;
  505. X!             }
  506. X!         }
  507. X!         }
  508. X          break;
  509. X      case SCR_MAGIC_MAPPING:
  510. X          known = TRUE;
  511. X--- 614,622 ----
  512. X          }
  513. X          known = TRUE;
  514. X          pline("This is a charging scroll.");
  515. X!         otmp = getobj("0#", "charge");
  516. X!         if (!otmp) break;
  517. X!         recharge(otmp, sobj->cursed ? -1 : (sobj->blessed ? 1 : 0));
  518. X          break;
  519. X      case SCR_MAGIC_MAPPING:
  520. X          known = TRUE;
  521. X***************
  522. X*** 589,603 ****
  523. X          }
  524. X          break;
  525. X      case SCR_AMNESIA:
  526. X-         {    register int zx, zy;
  527. X- 
  528. X          known = TRUE;
  529. X!         for(zx = 0; zx < COLNO; zx++) for(zy = 0; zy < ROWNO; zy++)
  530. X!             if(!confused || sobj->cursed || rn2(7))
  531. X!             if(!cansee(zx,zy))
  532. X!                 levl[zx][zy].seen = levl[zx][zy].new =
  533. X!                 levl[zx][zy].scrsym = 0;
  534. X!         docrt();
  535. X          if (Hallucination) /* Ommmmmm! */
  536. X              Your("mind releases itself from mundane concerns.");
  537. X          else if (!strncmp(plname, "Maud", 4))
  538. X--- 633,640 ----
  539. X          }
  540. X          break;
  541. X      case SCR_AMNESIA:
  542. X          known = TRUE;
  543. X!         forget( ((!sobj->blessed) << 1) | (!confused || sobj->cursed) );
  544. X          if (Hallucination) /* Ommmmmm! */
  545. X              Your("mind releases itself from mundane concerns.");
  546. X          else if (!strncmp(plname, "Maud", 4))
  547. X***************
  548. X*** 606,616 ****
  549. X              pline("Who was that Maud person anyway?");
  550. X          else
  551. X              pline("Thinking of Maud you forget everything else.");
  552. X- #ifdef SPELLS
  553. X-         if(!sobj->blessed) losespells();
  554. X- #endif
  555. X          break;
  556. X-         }
  557. X      case SCR_FIRE:
  558. X          {    register int num;
  559. X          register struct monst *mtmp;
  560. X--- 643,649 ----
  561. X***************
  562. X*** 762,769 ****
  563. X              pline(thats_enough_tries);
  564. X              return;
  565. X          }
  566. X-     pline("What class of monsters do you wish to genocide? [type a letter] ");
  567. X          do {
  568. X              getlin(buf);
  569. X          } while (buf[0]=='\033' || strlen(buf) != 1);
  570. X          immunecnt = gonecnt = goodcnt = 0;
  571. X--- 795,802 ----
  572. X              pline(thats_enough_tries);
  573. X              return;
  574. X          }
  575. X          do {
  576. X+     pline("What class of monsters do you wish to genocide? [type a letter] ");
  577. X              getlin(buf);
  578. X          } while (buf[0]=='\033' || strlen(buf) != 1);
  579. X          immunecnt = gonecnt = goodcnt = 0;
  580. X*** src/Old/restore.c    Sun Nov 19 13:09:44 1989
  581. X--- src/restore.c    Sun Nov 19 11:00:40 1989
  582. X***************
  583. X*** 67,72 ****
  584. X--- 67,93 ----
  585. X      }
  586. X  }
  587. X  
  588. X+ #ifndef NO_SIGNAL
  589. X+ static void
  590. X+ inven_inuse()
  591. X+ /* Things that were marked "in_use" when the game was saved (ex. via the
  592. X+  * infamous "HUP" cheat) get used up here.
  593. X+  */
  594. X+ {
  595. X+     register struct obj *otmp, *otmp2;
  596. X+ 
  597. X+     for(otmp = invent; otmp; otmp = otmp2) {
  598. X+         otmp2 = otmp->nobj;
  599. X+         if(otmp->olet != ARMOR_SYM && otmp->olet != WEAPON_SYM
  600. X+             && otmp->otyp != PICK_AXE && otmp->otyp != UNICORN_HORN
  601. X+             && otmp->in_use) {
  602. X+             pline("Finishing off %s...", xname(otmp));
  603. X+             useup(otmp);
  604. X+         }
  605. X+     }
  606. X+ }
  607. X+ #endif
  608. X+ 
  609. X  static struct obj *
  610. X  restobjchn(fd, ghostly)
  611. X  register int fd;
  612. X***************
  613. X*** 90,100 ****
  614. X          else otmp2->nobj = otmp;
  615. X          mread(fd, (genericptr_t) otmp, (unsigned) xl + sizeof(struct obj));
  616. X          if(!otmp->o_id) otmp->o_id = flags.ident++;
  617. X-     /* Things that were marked "in_use" when the game was saved (eg. via
  618. X-      * the infamous "HUP" cheat get used up here.
  619. X-      */
  620. X-         if(otmp->olet != ARMOR_SYM && otmp->olet != WEAPON_SYM
  621. X-             && otmp->otyp != PICK_AXE && otmp->in_use) useup(otmp);
  622. X  #ifdef TUTTI_FRUTTI
  623. X          if(ghostly && otmp->otyp == SLIME_MOLD) {
  624. X              for(oldf=oldfruit; oldf; oldf=oldf->nextf)
  625. X--- 111,116 ----
  626. X***************
  627. X*** 240,246 ****
  628. X--- 256,265 ----
  629. X  #endif /* DECRAINBOW */
  630. X      flags.IBMBIOS = oldflags.IBMBIOS;
  631. X  #endif
  632. X+ #ifdef TEXTCOLOR
  633. X+     flags.use_color = oldflags.use_color;
  634. X  #endif
  635. X+ #endif /* MSDOS */
  636. X      mread(fd, (genericptr_t) &dlevel, sizeof dlevel);
  637. X      mread(fd, (genericptr_t) &maxdlevel, sizeof maxdlevel);
  638. X      mread(fd, (genericptr_t) &moves, sizeof moves);
  639. X***************
  640. X*** 254,260 ****
  641. X  #ifdef REINCARNATION
  642. X      mread(fd, (genericptr_t) &rogue_level, sizeof rogue_level);
  643. X      if (dlevel==rogue_level)
  644. X!         savesyms = showsyms;
  645. X  #endif
  646. X  #ifdef STRONGHOLD
  647. X      mread(fd, (genericptr_t) &stronghold_level, sizeof stronghold_level);
  648. X--- 273,280 ----
  649. X  #ifdef REINCARNATION
  650. X      mread(fd, (genericptr_t) &rogue_level, sizeof rogue_level);
  651. X      if (dlevel==rogue_level)
  652. X!         (void) memcpy((genericptr_t)savesyms,
  653. X!                   (genericptr_t)showsyms, sizeof savesyms);
  654. X  #endif
  655. X  #ifdef STRONGHOLD
  656. X      mread(fd, (genericptr_t) &stronghold_level, sizeof stronghold_level);
  657. X***************
  658. X*** 406,413 ****
  659. X  #ifdef REINCARNATION
  660. X      /* this can't be done earlier because we need to check the initial
  661. X       * showsyms against the one saved in each of the non-rogue levels */
  662. X!     if (dlevel==rogue_level)
  663. X!         showsyms = defsyms;
  664. X  #endif
  665. X      if(u.ustuck) {
  666. X          register struct monst *mtmp;
  667. X--- 426,437 ----
  668. X  #ifdef REINCARNATION
  669. X      /* this can't be done earlier because we need to check the initial
  670. X       * showsyms against the one saved in each of the non-rogue levels */
  671. X!     if (dlevel==rogue_level) {
  672. X!         (void) memcpy((genericptr_t)showsyms,
  673. X!                   (genericptr_t)defsyms, sizeof showsyms);
  674. X!         showsyms[S_ndoor] = showsyms[S_vodoor] =
  675. X!             showsyms[S_hodoor] = '+';
  676. X!     }
  677. X  #endif
  678. X      if(u.ustuck) {
  679. X          register struct monst *mtmp;
  680. X***************
  681. X*** 430,435 ****
  682. X--- 454,466 ----
  683. X      for(otmp = fobj; otmp; otmp = otmp->nobj)
  684. X          if(otmp->owornmask)
  685. X              setworn(otmp, otmp->owornmask);
  686. X+ #ifndef NO_SIGNAL
  687. X+     /* in_use processing must be after:
  688. X+      *  inven has been read so fcobj has been built and freeinv() works
  689. X+      *  current level has been restored so billing information is available
  690. X+      */
  691. X+     inven_inuse();
  692. X+ #endif
  693. X      docrt();
  694. X      restoring = FALSE;
  695. X      return(1);
  696. X***************
  697. X*** 451,457 ****
  698. X      long nhp;
  699. X      int hpid;
  700. X      xchar dlvl;
  701. X!     struct symbols osymbol;
  702. X      int x, y;
  703. X      uchar osym, nsym;
  704. X  #ifdef TOS
  705. X--- 482,488 ----
  706. X      long nhp;
  707. X      int hpid;
  708. X      xchar dlvl;
  709. X!     symbol_array osymbol;
  710. X      int x, y;
  711. X      uchar osym, nsym;
  712. X  #ifdef TOS
  713. X***************
  714. X*** 526,534 ****
  715. X  #else
  716. X      mread(fd, (genericptr_t) levl, sizeof(levl));
  717. X  #endif
  718. X!     mread(fd, (genericptr_t) &osymbol, sizeof(osymbol));
  719. X!     if (memcmp((genericptr_t) &osymbol,
  720. X!            (genericptr_t) &showsyms, sizeof (struct symbols))
  721. X  #ifdef REINCARNATION
  722. X          && dlvl != rogue_level
  723. X          /* rogue level always uses default syms, and showsyms will still
  724. X--- 557,565 ----
  725. X  #else
  726. X      mread(fd, (genericptr_t) levl, sizeof(levl));
  727. X  #endif
  728. X!     mread(fd, (genericptr_t) osymbol, sizeof(osymbol));
  729. X!     if (memcmp((genericptr_t) osymbol,
  730. X!            (genericptr_t) showsyms, sizeof (showsyms))
  731. X  #ifdef REINCARNATION
  732. X          && dlvl != rogue_level
  733. X          /* rogue level always uses default syms, and showsyms will still
  734. X***************
  735. X*** 543,636 ****
  736. X                  switch (levl[x][y].typ) {
  737. X                  case STONE:
  738. X                  case SCORR:
  739. X!                     if (osym == osymbol.stone)
  740. X!                         nsym = showsyms.stone;
  741. X                      break;
  742. X                  case ROOM:
  743. X  #ifdef STRONGHOLD
  744. X                  case DRAWBRIDGE_DOWN:
  745. X  #endif /* STRONGHOLD /**/
  746. X!                     if (osym == osymbol.room)
  747. X!                         nsym = showsyms.room;
  748. X                      break;
  749. X                  case DOOR:
  750. X!                     if (osym == osymbol.door)
  751. X!                         nsym = showsyms.door;
  752. X                      break;
  753. X                  case CORR:
  754. X!                     if (osym == osymbol.corr)
  755. X!                         nsym = showsyms.corr;
  756. X                      break;
  757. X                  case VWALL:
  758. X!                     if (osym == osymbol.vwall)
  759. X!                         nsym = showsyms.vwall;
  760. X  #ifdef STRONGHOLD
  761. X!                     else if (osym == osymbol.dbvwall)
  762. X!                         nsym = showsyms.dbvwall;
  763. X  #endif
  764. X                      break;
  765. X                  case HWALL:
  766. X!                     if (osym == osymbol.hwall)
  767. X!                         nsym = showsyms.hwall;
  768. X  #ifdef STRONGHOLD
  769. X!                     else if (osym == osymbol.dbhwall)
  770. X!                         nsym = showsyms.dbhwall;
  771. X  #endif
  772. X                      break;
  773. X                  case TLCORNER:
  774. X!                     if (osym == osymbol.tlcorn)
  775. X!                         nsym = showsyms.tlcorn;
  776. X                      break;
  777. X                  case TRCORNER:
  778. X!                     if (osym == osymbol.trcorn)
  779. X!                         nsym = showsyms.trcorn;
  780. X                      break;
  781. X                  case BLCORNER:
  782. X!                     if (osym == osymbol.blcorn)
  783. X!                         nsym = showsyms.blcorn;
  784. X                      break;
  785. X                  case BRCORNER:
  786. X!                     if (osym == osymbol.brcorn)
  787. X!                         nsym = showsyms.brcorn;
  788. X                      break;
  789. X                  case SDOOR:
  790. X!                     if (osym == osymbol.vwall)
  791. X!                         nsym = showsyms.vwall;
  792. X!                     else if (osym == osymbol.hwall)
  793. X!                         nsym = showsyms.hwall;
  794. X                      break;
  795. X                  case CROSSWALL:
  796. X!                     if (osym == osymbol.crwall)
  797. X!                         nsym = showsyms.crwall;
  798. X                      break;
  799. X                  case TUWALL:
  800. X!                     if (osym == osymbol.tuwall)
  801. X!                         nsym = showsyms.tuwall;
  802. X                      break;
  803. X                  case TDWALL:
  804. X!                     if (osym == osymbol.tdwall)
  805. X!                         nsym = showsyms.tdwall;
  806. X                      break;
  807. X                  case TLWALL:
  808. X!                     if (osym == osymbol.tlwall)
  809. X!                         nsym = showsyms.tlwall;
  810. X                      break;
  811. X                  case TRWALL:
  812. X!                     if (osym == osymbol.trwall)
  813. X!                         nsym = showsyms.trwall;
  814. X                      break;
  815. X                  case STAIRS:
  816. X!                     if (osym == osymbol.upstair)
  817. X!                         nsym = showsyms.upstair;
  818. X!                     else if (osym == osymbol.dnstair)
  819. X!                         nsym = showsyms.dnstair;
  820. X                      break;
  821. X  #ifdef STRONGHOLD
  822. X                  case LADDER:
  823. X!                     if (osym == osymbol.upladder)
  824. X!                         nsym = showsyms.upladder;
  825. X!                     else if (osym == osymbol.dnladder)
  826. X!                         nsym = showsyms.dnladder;
  827. X                      break;
  828. X  #endif /* STRONGHOLD /**/
  829. X                  case POOL:
  830. X--- 574,673 ----
  831. X                  switch (levl[x][y].typ) {
  832. X                  case STONE:
  833. X                  case SCORR:
  834. X!                     if (osym == osymbol[S_stone])
  835. X!                         nsym = showsyms[S_stone];
  836. X                      break;
  837. X                  case ROOM:
  838. X  #ifdef STRONGHOLD
  839. X                  case DRAWBRIDGE_DOWN:
  840. X  #endif /* STRONGHOLD /**/
  841. X!                     if (osym == osymbol[S_room])
  842. X!                         nsym = showsyms[S_room];
  843. X                      break;
  844. X                  case DOOR:
  845. X!                     if (osym == osymbol[S_ndoor])
  846. X!                         nsym = showsyms[S_ndoor];
  847. X!                     else if (osym == osymbol[S_vodoor])
  848. X!                         nsym = showsyms[S_vodoor];
  849. X!                     else if (osym == osymbol[S_hodoor])
  850. X!                         nsym = showsyms[S_hodoor];
  851. X!                     else if (osym == osymbol[S_cdoor])
  852. X!                         nsym = showsyms[S_cdoor];
  853. X                      break;
  854. X                  case CORR:
  855. X!                     if (osym == osymbol[S_corr])
  856. X!                         nsym = showsyms[S_corr];
  857. X                      break;
  858. X                  case VWALL:
  859. X!                     if (osym == osymbol[S_vwall])
  860. X!                         nsym = showsyms[S_vwall];
  861. X  #ifdef STRONGHOLD
  862. X!                     else if (osym == osymbol[S_dbvwall])
  863. X!                         nsym = showsyms[S_dbvwall];
  864. X  #endif
  865. X                      break;
  866. X                  case HWALL:
  867. X!                     if (osym == osymbol[S_hwall])
  868. X!                         nsym = showsyms[S_hwall];
  869. X  #ifdef STRONGHOLD
  870. X!                     else if (osym == osymbol[S_dbhwall])
  871. X!                         nsym = showsyms[S_dbhwall];
  872. X  #endif
  873. X                      break;
  874. X                  case TLCORNER:
  875. X!                     if (osym == osymbol[S_tlcorn])
  876. X!                         nsym = showsyms[S_tlcorn];
  877. X                      break;
  878. X                  case TRCORNER:
  879. X!                     if (osym == osymbol[S_trcorn])
  880. X!                         nsym = showsyms[S_trcorn];
  881. X                      break;
  882. X                  case BLCORNER:
  883. X!                     if (osym == osymbol[S_blcorn])
  884. X!                         nsym = showsyms[S_blcorn];
  885. X                      break;
  886. X                  case BRCORNER:
  887. X!                     if (osym == osymbol[S_brcorn])
  888. X!                         nsym = showsyms[S_brcorn];
  889. X                      break;
  890. X                  case SDOOR:
  891. X!                     if (osym == osymbol[S_vwall])
  892. X!                         nsym = showsyms[S_vwall];
  893. X!                     else if (osym == osymbol[S_hwall])
  894. X!                         nsym = showsyms[S_hwall];
  895. X                      break;
  896. X                  case CROSSWALL:
  897. X!                     if (osym == osymbol[S_crwall])
  898. X!                         nsym = showsyms[S_crwall];
  899. X                      break;
  900. X                  case TUWALL:
  901. X!                     if (osym == osymbol[S_tuwall])
  902. X!                         nsym = showsyms[S_tuwall];
  903. X                      break;
  904. X                  case TDWALL:
  905. X!                     if (osym == osymbol[S_tdwall])
  906. X!                         nsym = showsyms[S_tdwall];
  907. X                      break;
  908. X                  case TLWALL:
  909. X!                     if (osym == osymbol[S_tlwall])
  910. X!                         nsym = showsyms[S_tlwall];
  911. X                      break;
  912. X                  case TRWALL:
  913. X!                     if (osym == osymbol[S_trwall])
  914. X!                         nsym = showsyms[S_trwall];
  915. X                      break;
  916. X                  case STAIRS:
  917. X!                     if (osym == osymbol[S_upstair])
  918. X!                         nsym = showsyms[S_upstair];
  919. X!                     else if (osym == osymbol[S_dnstair])
  920. X!                         nsym = showsyms[S_dnstair];
  921. X                      break;
  922. X  #ifdef STRONGHOLD
  923. X                  case LADDER:
  924. X!                     if (osym == osymbol[S_upladder])
  925. X!                         nsym = showsyms[S_upladder];
  926. X!                     else if (osym == osymbol[S_dnladder])
  927. X!                         nsym = showsyms[S_dnladder];
  928. X                      break;
  929. X  #endif /* STRONGHOLD /**/
  930. X                  case POOL:
  931. X***************
  932. X*** 638,668 ****
  933. X  #ifdef STRONGHOLD
  934. X                  case DRAWBRIDGE_UP:
  935. X  #endif /* STRONGHOLD /**/
  936. X!                     if (osym == osymbol.pool)
  937. X!                         nsym = showsyms.pool;
  938. X                      break;
  939. X  #ifdef FOUNTAINS
  940. X                  case FOUNTAIN:
  941. X!                     if (osym == osymbol.fountain)
  942. X!                         nsym = showsyms.fountain;
  943. X                      break;
  944. X  #endif /* FOUNTAINS /**/
  945. X  #ifdef THRONES
  946. X                  case THRONE:
  947. X!                     if (osym == osymbol.throne)
  948. X!                         nsym = showsyms.throne;
  949. X                      break;
  950. X  #endif /* THRONES /**/
  951. X  #ifdef SINKS
  952. X                  case SINK:
  953. X!                     if (osym == osymbol.sink)
  954. X!                         nsym = showsyms.sink;
  955. X                      break;
  956. X  #endif /* SINKS /**/
  957. X  #ifdef ALTARS
  958. X                  case ALTAR:
  959. X!                     if (osym == osymbol.altar)
  960. X!                         nsym = showsyms.altar;
  961. X                      break;
  962. X  #endif /* ALTARS /**/
  963. X                  default:
  964. X--- 675,705 ----
  965. X  #ifdef STRONGHOLD
  966. X                  case DRAWBRIDGE_UP:
  967. X  #endif /* STRONGHOLD /**/
  968. X!                     if (osym == osymbol[S_pool])
  969. X!                         nsym = showsyms[S_pool];
  970. X                      break;
  971. X  #ifdef FOUNTAINS
  972. X                  case FOUNTAIN:
  973. X!                     if (osym == osymbol[S_fountain])
  974. X!                         nsym = showsyms[S_fountain];
  975. X                      break;
  976. X  #endif /* FOUNTAINS /**/
  977. X  #ifdef THRONES
  978. X                  case THRONE:
  979. X!                     if (osym == osymbol[S_throne])
  980. X!                         nsym = showsyms[S_throne];
  981. X                      break;
  982. X  #endif /* THRONES /**/
  983. X  #ifdef SINKS
  984. X                  case SINK:
  985. X!                     if (osym == osymbol[S_sink])
  986. X!                         nsym = showsyms[S_sink];
  987. X                      break;
  988. X  #endif /* SINKS /**/
  989. X  #ifdef ALTARS
  990. X                  case ALTAR:
  991. X!                     if (osym == osymbol[S_altar])
  992. X!                         nsym = showsyms[S_altar];
  993. X                      break;
  994. X  #endif /* ALTARS /**/
  995. X                  default:
  996. X***************
  997. X*** 689,695 ****
  998. X      fmon = restmonchn(fd, ghostly);
  999. X  
  1000. X      /* regenerate animals while on another level */
  1001. X!     { long tmoves = (moves > omoves) ? moves-omoves : 0;
  1002. X        register struct monst *mtmp2;
  1003. X  
  1004. X        for(mtmp = fmon; mtmp; mtmp = mtmp2) {
  1005. X--- 726,732 ----
  1006. X      fmon = restmonchn(fd, ghostly);
  1007. X  
  1008. X      /* regenerate animals while on another level */
  1009. X!     { long tmoves = (monstermoves > omoves) ? monstermoves-omoves : 0;
  1010. X        register struct monst *mtmp2;
  1011. X  
  1012. X        for(mtmp = fmon; mtmp; mtmp = mtmp2) {
  1013. X*** src/Old/rip.c    Sun Nov 19 13:10:20 1989
  1014. X--- src/rip.c    Tue Oct 31 19:27:05 1989
  1015. X***************
  1016. X*** 3,8 ****
  1017. X--- 3,9 ----
  1018. X  /* NetHack may be freely redistributed.  See license for details. */
  1019. X  
  1020. X  #include "hack.h"
  1021. X+ #include <ctype.h>
  1022. X  
  1023. X  static char *rip[] = {
  1024. X  "                       ----------",
  1025. X***************
  1026. X*** 41,58 ****
  1027. X      register int x, y;
  1028. X  
  1029. X      cls();
  1030. X!     Sprintf(buf,"%s", plname);
  1031. X      buf[16] = 0;
  1032. X      center(6, buf);
  1033. X!     Sprintf(buf, "%ld AU", u.ugold);
  1034. X      center(7, buf);
  1035. X!     Sprintf(buf, "killed by%s",
  1036. X!         !strncmp(killer, "the ", 4) ? "" :
  1037. X!         (!strcmp(eos(killer)-4, "tion") && *(eos(killer)-5)!='o') ? "" :
  1038. X!         !strcmp(killer, "contaminated water") ? "" :
  1039. X!         !strncmp(killer, "Mr.", 3) ? "" :
  1040. X!         !strncmp(killer, "Ms.", 3) ? "" :
  1041. X!         index(vowels, *killer) ? " an" : " a");
  1042. X      center(8, buf);
  1043. X      Strcpy(buf, killer);
  1044. X      if(strlen(buf) > 16) {
  1045. X--- 42,57 ----
  1046. X      register int x, y;
  1047. X  
  1048. X      cls();
  1049. X!     Sprintf(buf, "%s", plname);
  1050. X      buf[16] = 0;
  1051. X      center(6, buf);
  1052. X!     Sprintf(buf, "%ld Au", u.ugold);
  1053. X      center(7, buf);
  1054. X!     Strcpy(buf, "killed by");
  1055. X!     if (islower(*killer) && strncmp(killer, "the ", 4) &&
  1056. X!         (strcmp(eos(killer)-4, "tion") || *(eos(killer)-5) == 'o') &&
  1057. X!         strcmp(killer, "contaminated water"))
  1058. X!         Strcat(buf, index(vowels, *killer) ? " an" : " a");
  1059. X      center(8, buf);
  1060. X      Strcpy(buf, killer);
  1061. X      if(strlen(buf) > 16) {
  1062. X*** src/Old/rumors.c    Sun Nov 19 13:10:43 1989
  1063. X--- src/rumors.c    Tue Nov 14 20:31:55 1989
  1064. X***************
  1065. X*** 113,119 ****
  1066. X  #else
  1067. X  # ifdef MACOS
  1068. X      if(rumors = fopen(RUMORFILE, "r"))
  1069. X!         rumors = openFile(RUMORFILE);
  1070. X      if (rumors) {
  1071. X  # else
  1072. X      if(rumors = fopen(RUMORFILE, "r")) {
  1073. X--- 113,119 ----
  1074. X  #else
  1075. X  # ifdef MACOS
  1076. X      if(rumors = fopen(RUMORFILE, "r"))
  1077. X!         rumors = openFile(RUMORFILE, "r");
  1078. X      if (rumors) {
  1079. X  # else
  1080. X      if(rumors = fopen(RUMORFILE, "r")) {
  1081. X***************
  1082. X*** 177,183 ****
  1083. X  #else
  1084. X  # ifdef MACOS
  1085. X      if(oracles = fopen(ORACLEFILE, "r"))
  1086. X!         oracles = openFile(ORACLEFILE);
  1087. X      if (oracles) {
  1088. X  # else
  1089. X      if(oracles = fopen(ORACLEFILE, "r")) {
  1090. X--- 177,183 ----
  1091. X  #else
  1092. X  # ifdef MACOS
  1093. X      if(oracles = fopen(ORACLEFILE, "r"))
  1094. X!         oracles = openFile(ORACLEFILE, "r");
  1095. X      if (oracles) {
  1096. X  # else
  1097. X      if(oracles = fopen(ORACLEFILE, "r")) {
  1098. X*** src/Old/save.c    Sun Nov 19 13:10:59 1989
  1099. X--- src/save.c    Sun Nov 19 10:59:38 1989
  1100. X***************
  1101. X*** 433,443 ****
  1102. X          /* if a game is saved off the rogue level, the usual showsyms
  1103. X           * will be written out for the rogue level too, but they will
  1104. X           * be ignored on restore so it doesn't matter */
  1105. X!         bwrite(fd, (genericptr_t) &savesyms, sizeof(struct symbols));
  1106. X      else
  1107. X  #endif
  1108. X!         bwrite(fd, (genericptr_t) &showsyms, sizeof(struct symbols));
  1109. X!     bwrite(fd,(genericptr_t) &monstermoves,sizeof(long));
  1110. X      bwrite(fd,(genericptr_t) &xupstair,sizeof(xupstair));
  1111. X      bwrite(fd,(genericptr_t) &yupstair,sizeof(yupstair));
  1112. X      bwrite(fd,(genericptr_t) &xdnstair,sizeof(xdnstair));
  1113. X--- 433,443 ----
  1114. X          /* if a game is saved off the rogue level, the usual showsyms
  1115. X           * will be written out for the rogue level too, but they will
  1116. X           * be ignored on restore so it doesn't matter */
  1117. X!         bwrite(fd, (genericptr_t) savesyms, sizeof savesyms);
  1118. X      else
  1119. X  #endif
  1120. X!         bwrite(fd, (genericptr_t) showsyms, sizeof showsyms);
  1121. X!     bwrite(fd,(genericptr_t) &monstermoves,sizeof(monstermoves));
  1122. X      bwrite(fd,(genericptr_t) &xupstair,sizeof(xupstair));
  1123. X      bwrite(fd,(genericptr_t) &yupstair,sizeof(yupstair));
  1124. X      bwrite(fd,(genericptr_t) &xdnstair,sizeof(xdnstair));
  1125. X*** src/Old/shk.c    Sun Nov 19 13:11:37 1989
  1126. X--- src/shk.c    Fri Nov 17 19:32:17 1989
  1127. X***************
  1128. X*** 1,4 ****
  1129. X! /*    SCCS Id: @(#)shk.c    3.0    89/02/10
  1130. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1131. X  /* NetHack may be freely redistributed.  See license for details. */
  1132. X  
  1133. X--- 1,4 ----
  1134. X! /*    SCCS Id: @(#)shk.c    3.0    89/11/15
  1135. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1136. X  /* NetHack may be freely redistributed.  See license for details. */
  1137. X  
  1138. X***************
  1139. X*** 9,15 ****
  1140. X  #include "eshk.h"
  1141. X  
  1142. X  #ifdef KOPS
  1143. X! static int makekops P((coord *));
  1144. X  static void kops_gone();
  1145. X  #endif /* KOPS */
  1146. X  
  1147. X--- 9,15 ----
  1148. X  #include "eshk.h"
  1149. X  
  1150. X  #ifdef KOPS
  1151. X! static int FDECL(makekops, (coord *));
  1152. X  static void kops_gone();
  1153. X  #endif /* KOPS */
  1154. X  
  1155. X***************
  1156. X*** 25,33 ****
  1157. X                  /* only accessed here and by save & restore */
  1158. X  static long int total;        /* filled by addupbill() */
  1159. X  static long int followmsg;    /* last time of follow message */
  1160. X! static void setpaid(), findshk P((int));
  1161. X! static int dopayobj P((struct bill_x *)), getprice P((struct obj *));
  1162. X! static struct obj *bp_to_obj P((struct bill_x *));
  1163. X  
  1164. X  /*
  1165. X      invariants: obj->unpaid iff onbill(obj) [unless bp->useup]
  1166. X--- 25,33 ----
  1167. X                  /* only accessed here and by save & restore */
  1168. X  static long int total;        /* filled by addupbill() */
  1169. X  static long int followmsg;    /* last time of follow message */
  1170. X! static void setpaid(), FDECL(findshk, (int));
  1171. X! static int FDECL(dopayobj, (struct bill_x *)), FDECL(getprice, (struct obj *));
  1172. X! static struct obj *FDECL(bp_to_obj, (struct bill_x *));
  1173. X  
  1174. X  /*
  1175. X      invariants: obj->unpaid iff onbill(obj) [unless bp->useup]
  1176. X***************
  1177. X*** 292,304 ****
  1178. X  }
  1179. X  
  1180. X  boolean
  1181. X! tended_shop(roomno)
  1182. X! register int roomno;
  1183. X  {
  1184. X      register struct monst *mtmp;
  1185. X  
  1186. X      for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
  1187. X!         if(mtmp->isshk && ESHK(mtmp)->shoproom == roomno
  1188. X          && inhishop(mtmp)) return(TRUE);
  1189. X      return(FALSE);
  1190. X  }
  1191. X--- 292,304 ----
  1192. X  }
  1193. X  
  1194. X  boolean
  1195. X! tended_shop(sroom)
  1196. X! struct mkroom *sroom;
  1197. X  {
  1198. X      register struct monst *mtmp;
  1199. X  
  1200. X      for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
  1201. X!         if(mtmp->isshk && &rooms[ESHK(mtmp)->shoproom] == sroom
  1202. X          && inhishop(mtmp)) return(TRUE);
  1203. X      return(FALSE);
  1204. X  }
  1205. X***************
  1206. X*** 945,951 ****
  1207. X      ltmp = (long) getprice(obj) * (long) obj->quan;
  1208. X      if(ESHK(shopkeeper)->billct == BILLSZ
  1209. X         || !saleable(rooms[ESHK(shopkeeper)->shoproom].rtype-SHOPBASE, obj)
  1210. X!        || obj->olet == BALL_SYM || ltmp == 0L) {
  1211. X          pline("%s seems not interested.", Monnam(shopkeeper));
  1212. X          obj->no_charge = 1;
  1213. X          return;
  1214. X--- 945,952 ----
  1215. X      ltmp = (long) getprice(obj) * (long) obj->quan;
  1216. X      if(ESHK(shopkeeper)->billct == BILLSZ
  1217. X         || !saleable(rooms[ESHK(shopkeeper)->shoproom].rtype-SHOPBASE, obj)
  1218. X!        || obj->olet == BALL_SYM || ltmp == 0L
  1219. X!        || (obj->olet == FOOD_SYM && obj->oeaten)) {
  1220. X          pline("%s seems not interested.", Monnam(shopkeeper));
  1221. X          obj->no_charge = 1;
  1222. X          return;
  1223. X***************
  1224. X*** 1114,1120 ****
  1225. X      omx = shkp->mx;
  1226. X      omy = shkp->my;
  1227. X  
  1228. X!     if((udist = dist(omx,omy)) < 3) {
  1229. X          if(ANGRY(shkp)) {
  1230. X              if(Displaced)
  1231. X                Your("displaced image doesn't fool %s!",
  1232. X--- 1115,1122 ----
  1233. X      omx = shkp->mx;
  1234. X      omy = shkp->my;
  1235. X  
  1236. X!     if((udist = dist(omx,omy)) < 3 &&
  1237. X!        (shkp->data != &mons[PM_GRID_BUG] || (omx==u.ux || omy==u.uy))) {
  1238. X          if(ANGRY(shkp)) {
  1239. X              if(Displaced)
  1240. X                Your("displaced image doesn't fool %s!",
  1241. X***************
  1242. X*** 1247,1253 ****
  1243. X          pline("\"%s, do not damage the floor here!\"",
  1244. X              flags.female ? "Madam" : "Sir");
  1245. X      if (pl_character[0] == 'K') adjalign(-sgn(u.ualigntyp));
  1246. X!     } else if(!um_dist(shopkeeper->mx, shopkeeper->my, 5)) {
  1247. X      register struct obj *obj, *obj2;
  1248. X  
  1249. X      if(dist(shopkeeper->mx, shopkeeper->my) > 2) {
  1250. X--- 1249,1256 ----
  1251. X          pline("\"%s, do not damage the floor here!\"",
  1252. X              flags.female ? "Madam" : "Sir");
  1253. X      if (pl_character[0] == 'K') adjalign(-sgn(u.ualigntyp));
  1254. X!     } else if(!um_dist(shopkeeper->mx, shopkeeper->my, 5) &&
  1255. X!           !shopkeeper->msleep && !shopkeeper->mfroz) {
  1256. X      register struct obj *obj, *obj2;
  1257. X  
  1258. X      if(dist(shopkeeper->mx, shopkeeper->my) > 2) {
  1259. X***************
  1260. X*** 1346,1353 ****
  1261. X      /* if he's not in his shop.. */
  1262. X      if(!in_shop(shopkeeper->mx ,shopkeeper->my)) return;
  1263. X  
  1264. X!     /* if a !shopkeeper shows up at the door, move him */
  1265. X!     if(MON_AT(x, y) && (mtmp = m_at(x, y)) != shopkeeper) {
  1266. X          if(flags.soundok) {
  1267. X              You("hear an angry voice: \"Out of my way, scum!\"");
  1268. X              (void) fflush(stdout);
  1269. X--- 1349,1358 ----
  1270. X      /* if he's not in his shop.. */
  1271. X      if(!in_shop(shopkeeper->mx ,shopkeeper->my)) return;
  1272. X  
  1273. X!     if(in_shop(u.ux, u.uy)) mnexto(shopkeeper);
  1274. X!     else {
  1275. X!         /* if a !shopkeeper shows up at the door, move him */
  1276. X!         if(MON_AT(x, y) && (mtmp = m_at(x, y)) != shopkeeper) {
  1277. X          if(flags.soundok) {
  1278. X              You("hear an angry voice: \"Out of my way, scum!\"");
  1279. X              (void) fflush(stdout);
  1280. X***************
  1281. X*** 1359,1372 ****
  1282. X  #endif
  1283. X          }
  1284. X          mnearto(mtmp, x, y, FALSE);
  1285. X!     }
  1286. X  
  1287. X!     /* make shk show up at the door */
  1288. X!     remove_monster(shopkeeper->mx, shopkeeper->my);
  1289. X!     place_monster(shopkeeper, x, y);
  1290. X!     pmon(shopkeeper);
  1291. X  
  1292. X!     damage = (ACURR(A_STR) > 18) ? 400 : 20 * ACURR(A_STR);
  1293. X  
  1294. X      if(um_dist(x, y, 1) || u.ugold < (long) damage || !rn2(50)) {
  1295. X          if(um_dist(x, y, 1))
  1296. X--- 1364,1379 ----
  1297. X  #endif
  1298. X          }
  1299. X          mnearto(mtmp, x, y, FALSE);
  1300. X!         }
  1301. X  
  1302. X!         /* make shk show up at the door */
  1303. X!         remove_monster(shopkeeper->mx, shopkeeper->my);
  1304. X!         place_monster(shopkeeper, x, y);
  1305. X!         pmon(shopkeeper);
  1306. X!     }
  1307. X  
  1308. X!     if(!strcmp(dmgstr, "destroy")) damage = 400;
  1309. X!     else damage = (ACURR(A_STR) > 18) ? 400 : 20 * ACURR(A_STR);
  1310. X  
  1311. X      if(um_dist(x, y, 1) || u.ugold < (long) damage || !rn2(50)) {
  1312. X          if(um_dist(x, y, 1))
  1313. X*** src/Old/shknam.c    Sun Nov 19 13:12:29 1989
  1314. X--- src/shknam.c    Wed Nov  8 22:57:41 1989
  1315. X***************
  1316. X*** 185,193 ****
  1317. X  {
  1318. X      register struct monst *mtmp;
  1319. X      int atype;
  1320. X  
  1321. X!     if (rn2(100) < dlevel && !MON_AT(sx, sy) &&
  1322. X!                 (mtmp=makemon(mkclass(S_MIMIC),sx,sy))) {
  1323. X          mtmp->mimic = 1;
  1324. X          /* note: makemon will set the mimic symbol to a shop item */
  1325. X          if (rn2(10) >= dlevel) mtmp->mappearance = S_MIMIC_DEF;
  1326. X--- 185,194 ----
  1327. X  {
  1328. X      register struct monst *mtmp;
  1329. X      int atype;
  1330. X+     struct permonst *ptr;
  1331. X  
  1332. X!     if (rn2(100) < dlevel && !MON_AT(sx, sy) && (ptr = mkclass(S_MIMIC)) &&
  1333. X!                 (mtmp=makemon(ptr,sx,sy))) {
  1334. X          mtmp->mimic = 1;
  1335. X          /* note: makemon will set the mimic symbol to a shop item */
  1336. X          if (rn2(10) >= dlevel) mtmp->mappearance = S_MIMIC_DEF;
  1337. X***************
  1338. X*** 314,321 ****
  1339. X      for(sx = sroom->lx - 1; sx <= sroom->hx + 1; sx++)
  1340. X      for(sy = sroom->ly - 1; sy <= sroom->hy + 1; sy++) {
  1341. X          if(IS_DOOR(levl[sx][sy].typ))
  1342. X!         if (levl[sx][sy].doormask == D_NODOOR)
  1343. X!             levl[sx][sy].doormask = D_ISOPEN;
  1344. X      }
  1345. X  
  1346. X      for(sx = sroom->lx; sx <= sroom->hx; sx++)
  1347. X--- 315,324 ----
  1348. X      for(sx = sroom->lx - 1; sx <= sroom->hx + 1; sx++)
  1349. X      for(sy = sroom->ly - 1; sy <= sroom->hy + 1; sy++) {
  1350. X          if(IS_DOOR(levl[sx][sy].typ))
  1351. X!         if (levl[sx][sy].doormask == D_NODOOR) {
  1352. X!           levl[sx][sy].doormask = D_ISOPEN;
  1353. X!           mnewsym(sx,sy);
  1354. X!         }
  1355. X      }
  1356. X  
  1357. X      for(sx = sroom->lx; sx <= sroom->hx; sx++)
  1358. X*** src/Old/sounds.c    Sun Nov 19 13:12:59 1989
  1359. X--- src/sounds.c    Sun Nov  5 16:16:26 1989
  1360. X***************
  1361. X*** 56,62 ****
  1362. X          You("seem to hear dishes being washed!");
  1363. X          break;
  1364. X      }
  1365. X!     if (!rn2(300)) {
  1366. X      roomtype = OROOM;
  1367. X      for (sroom = &rooms[0]; ; sroom++) {    /* find any special room */
  1368. X          if (sroom->hx < 0) break;        /* no more rooms */
  1369. X--- 56,62 ----
  1370. X          You("seem to hear dishes being washed!");
  1371. X          break;
  1372. X      }
  1373. X!     if (!rn2(200)) {
  1374. X      roomtype = OROOM;
  1375. X      for (sroom = &rooms[0]; ; sroom++) {    /* find any special room */
  1376. X          if (sroom->hx < 0) break;        /* no more rooms */
  1377. X***************
  1378. X*** 179,185 ****
  1379. X          }
  1380. X          break;
  1381. X          case SHOPBASE:
  1382. X!         if(tended_shop(croomno))
  1383. X            switch (rn2(2)+hallu) {
  1384. X              case 0:
  1385. X              You("hear the chime of a cash register.");
  1386. X--- 179,185 ----
  1387. X          }
  1388. X          break;
  1389. X          case SHOPBASE:
  1390. X!         if(tended_shop(sroom))
  1391. X            switch (rn2(2)+hallu) {
  1392. X              case 0:
  1393. X              You("hear the chime of a cash register.");
  1394. X***************
  1395. X*** 364,369 ****
  1396. X--- 364,372 ----
  1397. X      case MS_GURGLE:
  1398. X          kludge("%s gurgles.", Monnam(mtmp));
  1399. X          break;
  1400. X+     case MS_BURBLE:
  1401. X+         kludge("%s burbles.", Monnam(mtmp));
  1402. X+         break;
  1403. X      case MS_SHRIEK:
  1404. X          kludge("%s shrieks.", Monnam(mtmp));
  1405. X          aggravate();
  1406. X***************
  1407. X*** 472,478 ****
  1408. X              kludge("%s laughs.", Monnam(mtmp));
  1409. X          }
  1410. X          break;
  1411. X! # ifdef HARD
  1412. X      case MS_BRIBE:
  1413. X          if (mtmp->mpeaceful && !mtmp->mtame) {
  1414. X          (void) demon_talk(mtmp);
  1415. X--- 475,481 ----
  1416. X              kludge("%s laughs.", Monnam(mtmp));
  1417. X          }
  1418. X          break;
  1419. X! # ifdef INFERNO
  1420. X      case MS_BRIBE:
  1421. X          if (mtmp->mpeaceful && !mtmp->mtame) {
  1422. X          (void) demon_talk(mtmp);
  1423. X*** src/Old/sp_lev.c    Sun Nov 19 13:13:23 1989
  1424. X--- src/sp_lev.c    Tue Nov 14 20:33:14 1989
  1425. X***************
  1426. X*** 14,20 ****
  1427. X  #ifdef STRONGHOLD
  1428. X  #include "sp_lev.h"
  1429. X  
  1430. X! #if defined(MSDOS) && !defined(AMIGA)
  1431. X  # define RDMODE "rb"
  1432. X  #else
  1433. X  # define RDMODE "r"
  1434. X--- 14,20 ----
  1435. X  #ifdef STRONGHOLD
  1436. X  #include "sp_lev.h"
  1437. X  
  1438. X! #if defined(MSDOS) || defined(MACOS) && !defined(AMIGA)
  1439. X  # define RDMODE "rb"
  1440. X  #else
  1441. X  # define RDMODE "r"
  1442. X***************
  1443. X*** 29,35 ****
  1444. X--- 29,39 ----
  1445. X  static walk walklist[50];
  1446. X  extern int x_maze_max, y_maze_max;
  1447. X  
  1448. X+ #ifdef MACOS
  1449. X+ char **Map;
  1450. X+ #else
  1451. X  static char Map[COLNO][ROWNO];
  1452. X+ #endif
  1453. X  static char robjects[10], rloc_x[10], rloc_y[10], rmonst[10],
  1454. X      ralign[3] = { A_CHAOS, A_NEUTRAL, A_LAW };
  1455. X  static xchar xstart, ystart, xsize, ysize;
  1456. X***************
  1457. X*** 215,221 ****
  1458. X      object  tmpobj;
  1459. X      drawbridge tmpdb;
  1460. X      walk    tmpwalk;
  1461. X!     dig     tmpdig;
  1462. X      lad     tmplad;
  1463. X  #ifdef ALTARS
  1464. X      altar   tmpaltar;
  1465. X--- 219,225 ----
  1466. X      object  tmpobj;
  1467. X      drawbridge tmpdb;
  1468. X      walk    tmpwalk;
  1469. X!     digpos  tmpdig;
  1470. X      lad     tmplad;
  1471. X  #ifdef ALTARS
  1472. X      altar   tmpaltar;
  1473. X***************
  1474. X*** 327,332 ****
  1475. X--- 331,337 ----
  1476. X  
  1477. X          get_location(&x, &y);
  1478. X          levl[x][y].doormask = typ;
  1479. X+         mnewsym(x,y);
  1480. X  
  1481. X          /* Now the complicated part, list it with each subroom */
  1482. X          /* The dog move and mail daemon routines use this */
  1483. X***************
  1484. X*** 581,586 ****
  1485. X--- 586,595 ----
  1486. X      fd = fopen(tmp, RDMODE);
  1487. X  #else
  1488. X      fd = fopen(name, RDMODE);
  1489. X+ # ifdef MACOS
  1490. X+     if (!fd)
  1491. X+         fd = openFile(name, RDMODE);
  1492. X+ # endif
  1493. X  #endif
  1494. X  #ifdef OS2_CODEVIEW
  1495. X      }
  1496. X*** src/Old/spell.c    Sun Nov 19 13:13:46 1989
  1497. X--- src/spell.c    Fri Nov 17 19:33:22 1989
  1498. X***************
  1499. X*** 77,83 ****
  1500. X      return;
  1501. X  }
  1502. X  
  1503. X! static int
  1504. X  learn()
  1505. X  {
  1506. X      register int    i;
  1507. X--- 77,86 ----
  1508. X      return;
  1509. X  }
  1510. X  
  1511. X! #ifndef OVERLAY
  1512. X! static 
  1513. X! #endif
  1514. X! int
  1515. X  learn()
  1516. X  {
  1517. X      register int    i;
  1518. X***************
  1519. X*** 382,388 ****
  1520. X          healup(0, 0, 0, 1);
  1521. X          break;
  1522. X      case SPE_CURE_SICKNESS:
  1523. X!         You("are no longer ill.");
  1524. X          healup(0, 0, 1, 0);
  1525. X          break;
  1526. X      case SPE_EXTRA_HEALING:
  1527. X--- 385,391 ----
  1528. X          healup(0, 0, 0, 1);
  1529. X          break;
  1530. X      case SPE_CURE_SICKNESS:
  1531. X!         if (Sick) You("are no longer ill.");
  1532. X          healup(0, 0, 1, 0);
  1533. X          break;
  1534. X      case SPE_EXTRA_HEALING:
  1535. X*** src/Old/steal.c    Sun Nov 19 13:14:07 1989
  1536. X--- src/steal.c    Sun Nov 12 12:02:10 1989
  1537. X***************
  1538. X*** 61,67 ****
  1539. X  unsigned int stealoid;        /* object to be stolen */
  1540. X  unsigned int stealmid;        /* monster doing the stealing */
  1541. X  
  1542. X! static int
  1543. X  stealarm(){
  1544. X      register struct monst *mtmp;
  1545. X      register struct obj *otmp;
  1546. X--- 61,70 ----
  1547. X  unsigned int stealoid;        /* object to be stolen */
  1548. X  unsigned int stealmid;        /* monster doing the stealing */
  1549. X  
  1550. X! #ifndef OVERLAY
  1551. X! static 
  1552. X! #endif
  1553. X! int
  1554. X  stealarm(){
  1555. X      register struct monst *mtmp;
  1556. X      register struct obj *otmp;
  1557. X***************
  1558. X*** 83,88 ****
  1559. X--- 86,92 ----
  1560. X  }
  1561. X  
  1562. X  /* Returns 1 when something was stolen (or at least, when N should flee now)
  1563. X+  * Returns -1 if the monster died in the attempt
  1564. X   * Avoid stealing the object stealoid
  1565. X   */
  1566. X  int
  1567. X***************
  1568. X*** 94,100 ****
  1569. X      register int named = 0;
  1570. X  
  1571. X      /* the following is true if successful on first of two attacks. */
  1572. X!     if(dist(mtmp->mx, mtmp->my) > 3) return(0);
  1573. X  
  1574. X      if(!invent){
  1575. X          /* Not even a thousand men in armor can strip a naked man. */
  1576. X--- 98,104 ----
  1577. X      register int named = 0;
  1578. X  
  1579. X      /* the following is true if successful on first of two attacks. */
  1580. X!     if(!monnear(mtmp, u.ux, u.uy)) return(0);
  1581. X  
  1582. X      if(!invent){
  1583. X          /* Not even a thousand men in armor can strip a naked man. */
  1584. X***************
  1585. X*** 125,132 ****
  1586. X          impossible("Steal fails!");
  1587. X          return(0);
  1588. X      }
  1589. X      /* can't steal armor while wearing cloak - so steal the cloak. */
  1590. X!     if(otmp == uarm && uarmc) otmp = uarmc;
  1591. X  #ifdef SHIRT
  1592. X      else if(otmp == uarmu && uarmc) otmp = uarmc;
  1593. X      else if(otmp == uarmu && uarm) otmp = uarm;
  1594. X--- 129,139 ----
  1595. X          impossible("Steal fails!");
  1596. X          return(0);
  1597. X      }
  1598. X+     /* can't steal gloves while wielding - so steal the wielded item. */
  1599. X+     if (otmp == uarmg && uwep)
  1600. X+         otmp = uwep;
  1601. X      /* can't steal armor while wearing cloak - so steal the cloak. */
  1602. X!     else if(otmp == uarm && uarmc) otmp = uarmc;
  1603. X  #ifdef SHIRT
  1604. X      else if(otmp == uarmu && uarmc) otmp = uarmc;
  1605. X      else if(otmp == uarmu && uarm) otmp = uarm;
  1606. X***************
  1607. X*** 150,155 ****
  1608. X--- 157,165 ----
  1609. X              Ring_gone(otmp);
  1610. X              break;
  1611. X          case ARMOR_SYM:
  1612. X+             /* Stop putting on armor which has been stolen. */
  1613. X+             if (donning(otmp))
  1614. X+                 afternmv = 0;
  1615. X              if(multi < 0 || otmp == uarms){
  1616. X                if (otmp == uarm)  (void) Armor_off();
  1617. X                else if (otmp == uarmc) (void) Cloak_off();
  1618. X***************
  1619. X*** 209,214 ****
  1620. X--- 219,231 ----
  1621. X      freeinv(otmp);
  1622. X      pline("%s stole %s.", named ? "She" : Monnam(mtmp), doname(otmp));
  1623. X      mpickobj(mtmp,otmp);
  1624. X+     if (otmp->otyp == CORPSE && otmp->corpsenm == PM_COCKATRICE
  1625. X+         && !resists_ston(mtmp->data)) {
  1626. X+         pline("%s turns to stone.", Monnam(mtmp));
  1627. X+         stoned = TRUE;
  1628. X+         xkilled(mtmp, 0);
  1629. X+         return -1;
  1630. X+     }
  1631. X      return((multi < 0) ? 0 : 1);
  1632. X  }
  1633. X  
  1634. X*** src/Old/termcap.c    Sun Nov 19 13:14:24 1989
  1635. X--- src/termcap.c    Fri Nov 17 19:30:12 1989
  1636. X***************
  1637. X*** 8,18 ****
  1638. X  
  1639. X  #include <ctype.h>    /* for isdigit() */
  1640. X  
  1641. X! #ifndef MSDOS
  1642. X! # ifndef MACOS
  1643. X! # define TERMLIB    /* include termcap code */
  1644. X! # endif
  1645. X! #endif
  1646. X  
  1647. X  #if !defined(SYSV) || defined(TOS) || defined(UNIXPC)
  1648. X  # ifndef LINT
  1649. X--- 8,14 ----
  1650. X  
  1651. X  #include <ctype.h>    /* for isdigit() */
  1652. X  
  1653. X! #include "termcap.h"
  1654. X  
  1655. X  #if !defined(SYSV) || defined(TOS) || defined(UNIXPC)
  1656. X  # ifndef LINT
  1657. X***************
  1658. X*** 23,28 ****
  1659. X--- 19,29 ----
  1660. X  short    ospeed = 0;    /* gets around "not defined" error message */
  1661. X  #endif
  1662. X  
  1663. X+ #ifdef ASCIIGRAPH
  1664. X+   boolean IBMgraphics = FALSE;
  1665. X+ #endif
  1666. X+ 
  1667. X+ 
  1668. X  #ifdef MICROPORT_286_BUG
  1669. X  #define Tgetstr(key) (tgetstr(key,tbuf))
  1670. X  #else
  1671. X***************
  1672. X*** 81,96 ****
  1673. X      term = getenv("TERM");
  1674. X  #endif
  1675. X      /* Set the default map symbols */
  1676. X!     (void) memcpy((genericptr_t) &showsyms, 
  1677. X!         (genericptr_t) &defsyms, sizeof(struct symbols));
  1678. X! 
  1679. X! #if !defined(AMIGA) && !defined(TOS) && !defined(MACOS)
  1680. X! # if defined(TERMLIB) || !(defined(DECRAINBOW) || defined(OS2))
  1681. X! #  define IBMXASCII
  1682. X! # endif
  1683. X! #endif
  1684. X  
  1685. X! #ifdef IBMXASCII
  1686. X      /*
  1687. X       * If we're on an IBM box, default to the nice IBM Extended ASCII
  1688. X       * line-drawing characters (codepage 437).
  1689. X--- 82,91 ----
  1690. X      term = getenv("TERM");
  1691. X  #endif
  1692. X      /* Set the default map symbols */
  1693. X!     (void) memcpy((genericptr_t) showsyms, 
  1694. X!         (genericptr_t) defsyms, sizeof showsyms);
  1695. X  
  1696. X! #ifdef ASCIIGRAPH
  1697. X      /*
  1698. X       * If we're on an IBM box, default to the nice IBM Extended ASCII
  1699. X       * line-drawing characters (codepage 437).
  1700. X***************
  1701. X*** 103,135 ****
  1702. X       * characters.
  1703. X       */
  1704. X  # if !defined(MSDOS) || defined(DECRAINBOW) || defined(OS2)
  1705. X      if (strncmp("AT", term, 2) == 0)
  1706. X  # endif
  1707. X      {
  1708. X!         showsyms.vwall = 0xb3;    /* meta-3, vertical rule */
  1709. X!         showsyms.hwall = 0xc4;    /* meta-D, horizontal rule */
  1710. X!         showsyms.tlcorn = 0xda;    /* meta-Z, top left corner */
  1711. X!         showsyms.trcorn = 0xbf;    /* meta-?, top right corner */
  1712. X!         showsyms.blcorn = 0xc0;    /* meta-@, bottom left */
  1713. X!         showsyms.brcorn = 0xd9;    /* meta-Y, bottom right */
  1714. X!         showsyms.crwall = 0xc5;    /* meta-E, cross */
  1715. X!         showsyms.tuwall = 0xc1;    /* meta-A, T up */
  1716. X!         showsyms.tdwall = 0xc2;    /* meta-B, T down */
  1717. X!         showsyms.tlwall = 0xb4;    /* meta-4, T left */
  1718. X!         showsyms.trwall = 0xc3;    /* meta-C, T right */
  1719. X!         showsyms.vbeam = 0xb3;    /* meta-3, vertical rule */
  1720. X!         showsyms.hbeam = 0xc4;    /* meta-D, horizontal rule */
  1721. X!         showsyms.room = 0xfa;    /* meta-z, centered dot */
  1722. X!         showsyms.pool = 0xf7;    /* meta-w, approx. equals */
  1723. X      }
  1724. X! #endif /* IBMXASCII */
  1725. X! #undef IBMXASCII
  1726. X  
  1727. X  #ifdef TERMLIB
  1728. X      if(!term)
  1729. X  #endif
  1730. X  #if defined(TOS) && defined(__GNUC__) && defined(TERMLIB)
  1731. X!         term = "st52";        /* library has a default */
  1732. X  #else
  1733. X  # ifdef MACOS
  1734. X      /* dummy termcap for the Mac */
  1735. X--- 98,135 ----
  1736. X       * characters.
  1737. X       */
  1738. X  # if !defined(MSDOS) || defined(DECRAINBOW) || defined(OS2)
  1739. X+ #  ifdef TERMLIB
  1740. X      if (strncmp("AT", term, 2) == 0)
  1741. X+ #  endif
  1742. X  # endif
  1743. X      {
  1744. X!         IBMgraphics = TRUE;
  1745. X!         showsyms[S_vwall] = 0xb3;    /* meta-3, vertical rule */
  1746. X!         showsyms[S_hodoor] = 0xb3;
  1747. X!         showsyms[S_hwall] = 0xc4;    /* meta-D, horizontal rule */
  1748. X!         showsyms[S_vodoor] = 0xc4;
  1749. X!         showsyms[S_tlcorn] = 0xda;    /* meta-Z, top left corner */
  1750. X!         showsyms[S_trcorn] = 0xbf;    /* meta-?, top right corner */
  1751. X!         showsyms[S_blcorn] = 0xc0;    /* meta-@, bottom left */
  1752. X!         showsyms[S_brcorn] = 0xd9;    /* meta-Y, bottom right */
  1753. X!         showsyms[S_crwall] = 0xc5;    /* meta-E, cross */
  1754. X!         showsyms[S_tuwall] = 0xc1;    /* meta-A, T up */
  1755. X!         showsyms[S_tdwall] = 0xc2;    /* meta-B, T down */
  1756. X!         showsyms[S_tlwall] = 0xb4;    /* meta-4, T left */
  1757. X!         showsyms[S_trwall] = 0xc3;    /* meta-C, T right */
  1758. X!         showsyms[S_vbeam] = 0xb3;    /* meta-3, vertical rule */
  1759. X!         showsyms[S_hbeam] = 0xc4;    /* meta-D, horizontal rule */
  1760. X!         showsyms[S_room] = 0xfa;    /* meta-z, centered dot */
  1761. X!         showsyms[S_ndoor] = 0xfa;
  1762. X!         showsyms[S_pool] = 0xf7;    /* meta-w, approx. equals */
  1763. X      }
  1764. X! #endif /* ASCIIGRAPH */
  1765. X  
  1766. X  #ifdef TERMLIB
  1767. X      if(!term)
  1768. X  #endif
  1769. X  #if defined(TOS) && defined(__GNUC__) && defined(TERMLIB)
  1770. X!         term = "builtin";        /* library has a default */
  1771. X  #else
  1772. X  # ifdef MACOS
  1773. X      /* dummy termcap for the Mac */
  1774. X***************
  1775. X*** 155,161 ****
  1776. X          unsigned char   *sym;
  1777. X          short   i;
  1778. X  
  1779. X!         sym = &showsyms.stone;
  1780. X          theRes = GetResource(HACK_DATA,102);
  1781. X          HLock(theRes);
  1782. X          strncpy((char *)sym,(char *)(*theRes),32);
  1783. X--- 155,161 ----
  1784. X          unsigned char   *sym;
  1785. X          short   i;
  1786. X  
  1787. X!         sym = &showsyms[S_stone];
  1788. X          theRes = GetResource(HACK_DATA,102);
  1789. X          HLock(theRes);
  1790. X          strncpy((char *)sym,(char *)(*theRes),32);
  1791. X***************
  1792. X*** 173,178 ****
  1793. X--- 173,180 ----
  1794. X  # ifdef ANSI_DEFAULT
  1795. X  #  ifdef TOS
  1796. X      {
  1797. X+         CO = 80; LI = 25;
  1798. X+         TI = VS = VE = TE = "";
  1799. X          HO = "\033H";
  1800. X          CL = "\033E";        /* the VT52 termcap */
  1801. X          CE = "\033K";
  1802. X***************
  1803. X*** 184,194 ****
  1804. X          SO = "\033p";
  1805. X          SE = "\033q";
  1806. X          HI = "\033p";
  1807. X!         HE = "\033q\033b\020";
  1808. X          for (i = 0; i < SIZE(hilites); i++) {
  1809. X              hilites[i] = (char *) alloc(sizeof("Eb1"));
  1810. X!             Sprintf(hilites[i], (i%4)?"\033b%c","\033p", i);
  1811. X          }
  1812. X      }
  1813. X  #  else /* TOS */
  1814. X      {
  1815. X--- 186,200 ----
  1816. X          SO = "\033p";
  1817. X          SE = "\033q";
  1818. X          HI = "\033p";
  1819. X! #ifdef TEXTCOLOR
  1820. X!         HE = "\033q\033b\017";
  1821. X          for (i = 0; i < SIZE(hilites); i++) {
  1822. X              hilites[i] = (char *) alloc(sizeof("Eb1"));
  1823. X!             Sprintf(hilites[i], (i%4)?"\033b%c" : "\033p", i);
  1824. X          }
  1825. X+ #else
  1826. X+         HE = "\033q";
  1827. X+ #endif
  1828. X      }
  1829. X  #  else /* TOS */
  1830. X      {
  1831. X***************
  1832. X*** 230,236 ****
  1833. X--- 236,246 ----
  1834. X          for (i = 0; i < MAXCOLORS / 2; i++) {
  1835. X              hilites[i] = (char *) alloc(sizeof("\033[0;3%dm"));
  1836. X              hilites[i+BRIGHT] = (char *) alloc(sizeof("\033[1;3%dm"));
  1837. X+ #    ifdef MSDOS
  1838. X+             Sprintf(hilites[i], (i == BLUE ? "\033[1;3%dm" : "\033[0;3%dm"), i);
  1839. X+ #    else
  1840. X              Sprintf(hilites[i], "\033[0;3%dm", i);
  1841. X+ #    endif
  1842. X              Sprintf(hilites[i+BRIGHT], "\033[1;3%dm", i);
  1843. X          }
  1844. X  #   endif
  1845. X***************
  1846. X*** 241,247 ****
  1847. X          error("Can't get TERM.");
  1848. X  # endif /* ANSI_DEFAULT */
  1849. X  # endif /* MACOS */
  1850. X! #endif /* __GNUC__ */
  1851. X  #ifdef TERMLIB
  1852. X      tptr = (char *) alloc(1024);
  1853. X  
  1854. X--- 251,257 ----
  1855. X          error("Can't get TERM.");
  1856. X  # endif /* ANSI_DEFAULT */
  1857. X  # endif /* MACOS */
  1858. X! #endif /* __GNUC__ && TOS && TERMCAP */
  1859. X  #ifdef TERMLIB
  1860. X      tptr = (char *) alloc(1024);
  1861. X  
  1862. X***************
  1863. X*** 279,288 ****
  1864. X--- 289,306 ----
  1865. X      if (!CO) CO = tgetnum("co");
  1866. X      if (!LI) LI = tgetnum("li");
  1867. X  # else
  1868. X+ #  if defined(TOS) && defined(__GNUC__)
  1869. X+     if (!strcmp(term, "builtin"))
  1870. X+         get_scr_size();
  1871. X+     else {
  1872. X+ #  endif
  1873. X      CO = tgetnum("co");
  1874. X      LI = tgetnum("li");
  1875. X      if (!LI || !CO)            /* if we don't override it */
  1876. X          get_scr_size();
  1877. X+ #  if defined(TOS) && defined(__GNUC__)
  1878. X+     }
  1879. X+ #  endif
  1880. X  # endif
  1881. X      if(CO < COLNO || LI < ROWNO+3)
  1882. X          setclipped();
  1883. X***************
  1884. X*** 314,319 ****
  1885. X--- 332,340 ----
  1886. X      TI = Tgetstr("ti");
  1887. X      TE = Tgetstr("te");
  1888. X      VS = VE = "";
  1889. X+ # ifdef TERMINFO
  1890. X+     VS = Tgetstr("enacs");    /* graphics start */
  1891. X+ # endif
  1892. X  # if 0
  1893. X      MB = Tgetstr("mb");    /* blink */
  1894. X      MD = Tgetstr("md");    /* boldface */
  1895. X***************
  1896. X*** 378,383 ****
  1897. X--- 399,419 ----
  1898. X  
  1899. X  /* Cursor movements */
  1900. X  
  1901. X+ #ifdef CLIPPING
  1902. X+ /* if (x,y) is currently viewable, move the cursor there and return TRUE */
  1903. X+ boolean
  1904. X+ win_curs(x, y)
  1905. X+ int x, y;
  1906. X+ {
  1907. X+     if (clipping && (x<=clipx || x>=clipxmax || y<=clipy || y>=clipymax))
  1908. X+         return FALSE;
  1909. X+     y -= clipy;
  1910. X+     x -= clipx;
  1911. X+     curs(x, y+2);
  1912. X+     return TRUE;
  1913. X+ }
  1914. X+ #endif
  1915. X+ 
  1916. X  void
  1917. X  curs(x, y)
  1918. X  register int x, y;    /* not xchar: perhaps xchar is unsigned and
  1919. X***************
  1920. X*** 500,506 ****
  1921. X             but is better than nothing */
  1922. X          register int cx = curx, cy = cury;
  1923. X  
  1924. X!         while(curx < COLNO) {
  1925. X              xputc(' ');
  1926. X              curx++;
  1927. X          }
  1928. X--- 536,542 ----
  1929. X             but is better than nothing */
  1930. X          register int cx = curx, cy = cury;
  1931. X  
  1932. X!         while(curx < CO) {
  1933. X              xputc(' ');
  1934. X              curx++;
  1935. X          }
  1936. X***************
  1937. X*** 585,591 ****
  1938. X      (void) fflush(stdout);
  1939. X  }
  1940. X  
  1941. X! #if defined(TERMLIB) || defined(DECRAINBOW)
  1942. X  void
  1943. X  graph_on() {
  1944. X      if (AS) xputs(AS);
  1945. X--- 621,627 ----
  1946. X      (void) fflush(stdout);
  1947. X  }
  1948. X  
  1949. X! #ifdef ASCIIGRAPH
  1950. X  void
  1951. X  graph_on() {
  1952. X      if (AS) xputs(AS);
  1953. X***************
  1954. X*** 632,641 ****
  1955. X          tputs("$<50>", 1, xputc);
  1956. X  #  endif
  1957. X  # else
  1958. X!         tputs("50", 1, xputs);
  1959. X  # endif
  1960. X  
  1961. X!     else if(ospeed > 0 || ospeed < SIZE(tmspc10)) if(CM) {
  1962. X          /* delay by sending cm(here) an appropriate number of times */
  1963. X          register int cmlen = strlen(tgoto(CM, curx-1, cury-1));
  1964. X          register int i = 500 + tmspc10[ospeed]/2;
  1965. X--- 668,677 ----
  1966. X          tputs("$<50>", 1, xputc);
  1967. X  #  endif
  1968. X  # else
  1969. X!         tputs("50", 1, xputc);
  1970. X  # endif
  1971. X  
  1972. X!     else if(ospeed > 0 && ospeed < SIZE(tmspc10)) if(CM) {
  1973. X          /* delay by sending cm(here) an appropriate number of times */
  1974. X          register int cmlen = strlen(tgoto(CM, curx-1, cury-1));
  1975. X          register int i = 500 + tmspc10[ospeed]/2;
  1976. X***************
  1977. X*** 769,774 ****
  1978. X--- 805,815 ----
  1979. X          if (foreg != c && backg != c) {
  1980. X          hilites[c] = (char *) alloc(sizeof("\033[0;3%d;4%dm"));
  1981. X          hilites[c+BRIGHT] = (char *) alloc(sizeof("\033[1;3%d;4%dm"));
  1982. X+ #ifdef MSDOS    /* brighten low-visibility colors */
  1983. X+         if (c == BLUE)
  1984. X+             Sprintf(hilites[c], "\033[1;3%d;4%dm", c, backg);
  1985. X+         else
  1986. X+ #endif
  1987. X          Sprintf(hilites[c], "\033[0;3%d;4%dm", c, backg);
  1988. X          Sprintf(hilites[c+BRIGHT], "\033[1;3%d;4%dm", c, backg);
  1989. X          }
  1990. X*** src/Old/timeout.c    Sun Nov 19 13:14:54 1989
  1991. X--- src/timeout.c    Sun Nov  5 16:16:14 1989
  1992. X***************
  1993. X*** 112,118 ****
  1994. X              make_vomiting(0L, TRUE);
  1995. X              break;
  1996. X          case SICK:
  1997. X!             You("die from food poisoning.");
  1998. X              killer = u.usick_cause;
  1999. X              done(POISONING);
  2000. X              break;
  2001. X--- 112,118 ----
  2002. X              make_vomiting(0L, TRUE);
  2003. X              break;
  2004. X          case SICK:
  2005. X!             You("die from your illness.");
  2006. X              killer = u.usick_cause;
  2007. X              done(POISONING);
  2008. X              break;
  2009. X***************
  2010. X*** 216,228 ****
  2011. X          if(Blind)
  2012. X              You("feel something %s from your pack!",
  2013. X                (index(slithy, mtmp->data->mlet)) ?
  2014. X!               "slither" : "drop");
  2015. X          else
  2016. X!             pline("A%s %s just %s out of your pack!",
  2017. X!               (index(vowels, *(mtmp->data->mname))) ? "n" : "",
  2018. X!               mtmp->data->mname,
  2019. X                (index(slithy, mtmp->data->mlet)) ?
  2020. X!               "slithered" : "dropped");
  2021. X  
  2022. X  #ifdef POLYSELF
  2023. X          if (yours) {
  2024. X--- 216,227 ----
  2025. X          if(Blind)
  2026. X              You("feel something %s from your pack!",
  2027. X                (index(slithy, mtmp->data->mlet)) ?
  2028. X!                   "slither" : "drop");
  2029. X          else
  2030. X!             pline("%s just %s out of your pack!",
  2031. X!               An(mtmp->data->mname),
  2032. X                (index(slithy, mtmp->data->mlet)) ?
  2033. X!                   "slithered" : "dropped");
  2034. X  
  2035. X  #ifdef POLYSELF
  2036. X          if (yours) {
  2037. X***************
  2038. X*** 229,234 ****
  2039. X--- 228,234 ----
  2040. X              pline("Its cries sound like \"%s.\"",
  2041. X              flags.female ? "mommy" : "daddy");
  2042. X              (void) tamedog(mtmp, (struct obj *)0);
  2043. X+             mtmp->mtame = 20;
  2044. X              return;
  2045. X          }
  2046. X  #endif
  2047. END_OF_FILE
  2048. if test 53197 -ne `wc -c <'patches06k'`; then
  2049.     echo shar: \"'patches06k'\" unpacked with wrong size!
  2050. fi
  2051. # end of 'patches06k'
  2052. fi
  2053. echo shar: End of archive 11 \(of 15\).
  2054. cp /dev/null ark11isdone
  2055. MISSING=""
  2056. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do
  2057.     if test ! -f ark${I}isdone ; then
  2058.     MISSING="${MISSING} ${I}"
  2059.     fi
  2060. done
  2061. if test "${MISSING}" = "" ; then
  2062.     echo You have unpacked all 15 archives.
  2063.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2064. else
  2065.     echo You still need to unpack the following archives:
  2066.     echo "        " ${MISSING}
  2067. fi
  2068. ##  End of shell archive.
  2069. exit 0
  2070.